package com.terrynoya.fight.data.parser.sff
{
	import flash.utils.ByteArray;
	/**
	 * dec  hex  size   meaning
 0    0     2   groupno
 2    2     2   itemno
 4    4     2   width
 6    6     2   height
 8    8     2   axisx
10    A     2   axisy
12    C     2   Index number of the linked sprite (if linked)
14    E     1   fmt
15    F     1   coldepth
16   10     4   offset into ldata or tdata
20   14     4   Sprite data length (0: linked)
24   18     2   palette index
26   1A     2   flags
	 * @author acer
	 */
	public class SFFSpriteNodeHeader
	{
		public var groupNo:int;
		public var itemno:int;
		public var width:int;
		public var height:int;
		public var axisx:int;
		public var axisy:int;
		public var linkSpriteIndex:int;
		public var fmt:int;
		public var coldepth:int;
		public var offset2Data:int;
		public var spriteDataLen:int;
		public var paltteIndex:int;
		public var flags:int;
		
		public function SFFSpriteNodeHeader(bytes:ByteArray):void
		{
			groupNo = bytes.readUnsignedShort();
			itemno = bytes.readUnsignedShort();
			width = bytes.readUnsignedShort();
			height = bytes.readUnsignedShort();
			axisx = bytes.readShort();
			axisy = bytes.readShort();
			linkSpriteIndex = bytes.readShort();
			fmt = bytes.readByte();
			coldepth = bytes.readByte();
			offset2Data = bytes.readInt();
			spriteDataLen = bytes.readInt();
			paltteIndex = bytes.readShort();
			flags = bytes.readShort();
		}
	}
}
